package com.le.tester.onjava8.l_1_17_2;

/**
 * createTime：2022/12/27 14:07
 * description：使用guard来进行更加细的匹配
 */

interface Shape {
    double area();
}

class Circle implements Shape {

    @Override
    public double area() {
        return Math.PI;
    }
}

class Rectangle implements Shape {

    @Override
    public double area() {
        return 1;
    }
}


public class Shapes {
    static void classify(Shape s) {

    }
}
